<?php

/**
 * Base class for all application tests
 *
 * @category    Ext
 * @package     Ext_Test_PHPUnit
 */
abstract class Ext_Test_PHPUnit_ControllerTestCase extends Ext_Test_PHPUnit_ApplicationTestCase
{
    public function appBootstrap()
    {
        $this->_application = new Zend_Application(APPLICATION_ENV,
                APPLICATION_PATH . '/configs/application.ini');

        $this->_application->bootstrap();

        $front = Zend_Controller_Front::getInstance();

        if ($front->getParam('bootstrap') === null) {
            $front->setParam('bootstrap', $this->_application->getBootstrap());
        }
    }
    
    public function tearDown()
    {
        Zend_Controller_Front::getInstance()->resetInstance();

        $this->resetRequest();
        $this->resetResponse();

        $this->request->setPost(array());
        $this->request->setQuery(array());
    }
}
